package JUC;

import java.util.concurrent.*;

public class ThreadPoolTest {

    public static void main(String[] args) {
        ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(
                5,
                10,
                10,
                TimeUnit.SECONDS,
                new LinkedBlockingQueue<>(10),
                Executors.defaultThreadFactory(),  //线程工厂
                new ThreadPoolExecutor.AbortPolicy()


        );
        threadPoolExecutor.shutdown();
        threadPoolExecutor.shutdownNow();
    }
}
